import {Routes, RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';
import {ProductComponent} from './product.component';
import {ProductlistComponent} from './list/productlist.component';
import {ProductaddComponent} from './add/productadd.component';


export const routes: Routes = [
    {
        path: 'list',
        component: ProductComponent,
        //redirectTo: "all",
        children: [{
            path:"",
            component:ProductlistComponent,
            pathMatch: 'full',
            redirectTo: "/member/product/list/all"
        },{
        	path:":type/:classifyId",
        	component:ProductlistComponent
        },{
        	path:":type",
        	component:ProductlistComponent
        }]
    },{
        path:"add",
        component:ProductaddComponent
    },{
        path:"edit/:id",
        component:ProductaddComponent
    }
];


export const routing: ModuleWithProviders = RouterModule.forChild(routes);